import service from '@/utils/request'
// eslint-disable-next-line no-unused-vars
const { httpPostForm, httpPost, httpGet } = service

const request = {
    // 通用--获取本路由的权限
    getMenuId (menuId) {
        return httpGet({
            url: '/permission/functional/getFunctional',
            params: {
                menuId
            },
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })
    },
    /**********************************周材入库********************************* */
    /**周材入库--修改基本信息 */
    turnoverWarehousingUpdate (params) {
        return httpPost({
            url: '/turnover/warehousing/update',
            params
        })
    },
    /**周材入库--修改明细 */
    turnoverWarehousingUpdateDtlList (params) {
        return httpPost({
            url: '/turnover/warehousing/updateDtlList',
            params
        })
    },

    /**查询入库基本信息 */
    turnoverProviderReturnedPurchaseGetStockById (id) {
        return httpGet({
            url: '/turnover/providerReturnedPurchase/getStockById',
            params: {
                id
            },
        })
    },
    /**查询入库明细 */
    turnoverWarehousingFindByBillId (billId) {
        return httpGet({
            url: '/turnover/warehousing/findByBillId',
            params: {
                billId
            },
        })
    },
    /**根据OrgId查询仓库 */
    getProjectDepartmentWarehouse (orgId) {
        return httpGet({
            url: '/material/warehouseManagement/getProjectDepartmentWarehouse',
            params: {
                orgId
            },
        })
    },

    /**********************************周材退货********************************* */
    /**周材退货 -- 查询明细 */
    turnoverProviderReturnedPurchaseFindByBillId (billId) {
        return httpGet({
            url: '/turnover/providerReturnedPurchase/findByBillId',
            params: {
                billId
            },
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })
    },
    /**周材退货--修改基本信息 */
    turnoverProviderReturnedPurchaseUpdate (params) {
        return httpPost({
            url: '/turnover/providerReturnedPurchase/update',
            params
        })
    },
    /**周材退货--更新明细 */
    turnoverProviderReturnedPurchaseUpdateDtlList (params) {
        return httpPost({
            url: '/turnover/providerReturnedPurchase/updateDtlList',
            params
        })
    },
    /**********************************周材领料********************************* */
    /**周材领料--修改基本信息 */
    turnoverReceiveUpdate (params) {
        return httpPost({
            url: '/turnover/receive/update',
            params
        })
    },
    /**周材领料--更新明细 */
    turnoverReceiveUpdateDtlList (params) {
        return httpPost({
            url: '/turnover/receive/updateDtlList',
            params
        })
    },
    /**周材领料 -- 查询明细 */
    turnoverReceiveFindByBillId (billId) {
        return httpGet({
            url: '/turnover/receive/findByBillId',
            params: {
                billId
            },
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })
    },
    /**********************************分包商退库********************************* */
    /**分包商退库--修改基本信息 */
    turnoverReturnToWarehouseUpdate (params) {
        return httpPost({
            url: '/turnover/returnToWarehouse/update',
            params
        })
    },
    /**分包商退库--更新明细 */
    turnoverReturnToWarehouseUpdateDtl (params) {
        return httpPost({
            url: '/turnover/returnToWarehouse/updateDtl',
            params
        })
    },
    /**分包商退库 -- 查询明细 */
    turnoverReturnToWarehouseGetDtlList (billId) {
        return httpGet({
            url: '/turnover/returnToWarehouse/getDtlList',
            params: {
                billId
            },
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })
    },
    /**********************************周材调拨********************************* */
    /**周材调拨--修改基本信息 */
    turnoverAllocationUpdate (params) {
        return httpPost({
            url: '/turnover/allocation/update',
            params
        })
    },
    /**周材调拨--更新明细 */
    turnoverAllocationUpdateDtlList (params) {
        return httpPost({
            url: '/turnover/allocation/updateDtlList',
            params
        })
    },
    /**周材调拨 -- 查询明细 */
    turnoverAllocationFindByBillId (billId) {
        return httpGet({
            url: '/turnover/allocation/findByBillId',
            params: {
                billId
            },
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })
    },
    /**周材调拨 -- 冲红单 */
    turnoverAllocationInitRed (billId) {
        return httpGet({
            url: '/turnover/allocation/initRed',
            params: {
                billId
            },
        })
    },
    /**********************************闲置登记********************************* */
    /**闲置登记--修改基本信息 */
    turnoverIdleRegistrationUpdate (params) {
        return httpPost({
            url: '/turnover/idleRegistration/update',
            params
        })
    },
    /**闲置登记--更新明细 */
    turnoverIdleRegistrationUpdateDtlList (params) {
        return httpPost({
            url: '/turnover/idleRegistration/updateDtlList',
            params
        })
    },
    /**闲置登记 -- 查询明细 */
    turnoverIdleRegistrationFindByBillId (billId) {
        return httpGet({
            url: '/turnover/idleRegistration/findByBillId',
            params: {
                billId
            },
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })
    },
    /**********************************内租调动********************************* */
    /**内租调动--修改基本信息 */
    turnoverInternalLeaseTransferUpdate (params) {
        return httpPost({
            url: '/turnover/internalLeaseTransfer/update',
            params
        })
    },
    /**内租调动--更新明细 */
    turnoverInternalLeaseTransferUpdateDtl (params) {
        return httpPost({
            url: '/turnover/internalLeaseTransfer/updateDtl',
            params
        })
    },
    /**内租调动 -- 查询明细 */
    turnoverInternalLeaseTransferGetDtlList (billId) {
        return httpGet({
            url: '/turnover/internalLeaseTransfer/getDtlList',
            params: {
                billId
            },
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })
    },
    /**内租调动变更 --  初始化*/
    turnoverInternalLeaseTransferInit (billId) {
        return httpGet({
            url: '/turnover/internalLeaseTransfer/init',
            params: {
                billId
            },
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })
    },
    /**内租调动变更--修改基本信息 */
    turnoverInternalLeaseTransferChangedUpdate (params) {
        return httpPost({
            url: '/turnover/internalLeaseTransferChanged/update',
            params
        })
    },
    /**内租调动变更--更新明细 */
    turnoverInternalLeaseTransferChangedUpdateDtl (params) {
        return httpPost({
            url: '/turnover/internalLeaseTransferChanged/updateDtl',
            params
        })
    },
    /**内租调动变更 -- 查询明细 */
    turnoverInternalLeaseTransferChangedGetDtlList (billId) {
        return httpGet({
            url: '/turnover/internalLeaseTransferChanged/getDtlList',
            params: {
                billId
            },
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })
    },
    /**********************************租赁退场********************************* */
    /**租赁退场--修改基本信息 */
    turnoverLeaseExitUpdate (params) {
        return httpPost({
            url: '/turnover/leaseExit/update',
            params
        })
    },
    /**租赁退场--更新明细 */
    turnoverLeaseExitUpdateDtl (params) {
        return httpPost({
            url: '/turnover/leaseExit/updateDtl',
            params
        })
    },
    /**租赁退场 -- 查询明细 */
    turnoverLeaseExitFindDtlByBillId (billId) {
        return httpGet({
            url: '/turnover/leaseExit/findDtlByBillId',
            params: {
                billId
            }
        })
    },
    /**租赁退场 -- 判断是否终期退场 */
    turnoverLeaseExitIsFinallyExit (lessorId) {
        return httpGet({
            url: '/turnover/leaseExit/isFinallyExit',
            params: {
                lessorId
            }
        })
    },
    /**********************************摊销盘点********************************* */
    /**摊销盘点--修改基本信息 */
    turnoverInventoryUpdate (params) {
        return httpPost({
            url: '/turnover/inventory/update',
            params
        })
    },
    /**摊销盘点--更新明细 */
    turnoverInventoryUpdateDtl (params) {
        return httpPost({
            url: '/turnover/inventory/updateDtl',
            params
        })
    },
    /**摊销盘点 -- 查询明细 */
    turnoverInventoryGetDtlList (billId) {
        return httpGet({
            url: '/turnover/inventory/getDtlList',
            params: {
                billId
            },
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })
    },
    /**摊销盘点 -- 红单初始化 */
    turnoverInventoryInitRed (billId) {
        return httpGet({
            url: '/turnover/inventory/initRed',
            params: {
                billId
            }
        })
    },
    /**********************************摊销********************************* */
    /**摊销--修改基本信息 */
    turnoverAmortizationUpdate (params) {
        return httpPost({
            url: '/turnover/amortization/update',
            params
        })
    },
    /**摊销--更新明细 */
    turnoverAmortizationUpdateDtl (params) {
        return httpPost({
            url: '/turnover/amortization/updateDtl',
            params
        })
    },
    /**摊销 -- 查询明细 */
    turnoverAmortizationGetDtlList (billId) {
        return httpGet({
            url: '/turnover/amortization/getDtlList',
            params: {
                billId
            },
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })
    },
    /**摊销--更新分包商分摊成本明细 */
    turnoverAmortizationUpdateCostSharingDtl (params) {
        return httpPost({
            url: '/turnover/amortization/updateCostSharingDtl',
            params
        })
    },
    /**摊销 -- 查询分包商分摊成本明细 */
    turnoverAmortizationGetCostSharingDtl (billId) {
        return httpGet({
            url: '/turnover/amortization/getCostSharingDtl',
            params: {
                billId
            },
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })
    },
    /**摊销 -- 初始化红单 */
    turnoverAmortizationInitRed (billId) {
        return httpGet({
            url: '/turnover/amortization/initRed',
            params: {
                billId
            },
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })
    },
    /**********************************摊销比例变更********************************* */
    /**摊销比例变更--修改基本信息 */
    turnoverAmortizationRatioChangedUpdate (params) {
        return httpPost({
            url: '/turnover/amortizationRatioChanged/update',
            params
        })
    },
    /**摊销比例变更--更新明细 */
    turnoverAmortizationRatioChangedUpdateDtl (params) {
        return httpPost({
            url: '/turnover/amortizationRatioChanged/updateDtl',
            params
        })
    },
    /**摊销比例变更 -- 查询明细 */
    turnoverAmortizationRatioChangedGetDtlList (billId) {
        return httpGet({
            url: '/turnover/amortizationRatioChanged/getDtlList',
            params: {
                billId
            },
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })
    },
    /**********************************月结********************************* */
    /**月结--修改基本信息 */
    turnoverRmonthlySettlementUpdate (params) {
        return httpPost({
            url: '/turnover/rmonthlySettlement/update',
            params
        })
    },
    /**月结--更新明细 */
    turnoverRmonthlySettlementDtlUpdateDtlList (params) {
        return httpPost({
            url: '/turnover/rmonthlySettlement/updateDtlList',
            params
        })
    },
    /**月结 -- 查询明细 */
    turnoverRmonthlySettlementGetDtlList (billId) {
        return httpGet({
            url: '/turnover/rmonthlySettlement/getDtlList',
            params: {
                billId
            }
        })
    },
    /**月结 -- 点击月结按钮查询月结信息 */
    turnoverRmonthlySettlementMonthly (date) {
        return httpGet({
            url: '/turnover/rmonthlySettlement/monthly',
            params: {
                date
            },
        })
    },
    /**月结--提交月结 */
    turnoverRmonthlySettlementCommit (billId) {
        return httpGet({
            url: '/turnover/rmonthlySettlement/commit',
            params: {
                billId
            },
        })
    },
    /**********************************摊销汇总********************************* */
    /**摊销汇总--修改基本信息 */
    turnoverAmortizationSummaryUpdate (params) {
        return httpPost({
            url: '/turnover/amortizationSummary/update',
            params
        })
    },
    /**摊销汇总--红单初始化 */
    turnoverAmortizationSummaryInit (billId) {
        return httpGet({
            url: '/turnover/amortizationSummary/init',
            params: {
                billId
            },
        })
    },
    /**摊销汇总--汇总明细 */
    turnoverAmortizationSummarySummaryDtl (params) {
        return httpPost({
            url: '/turnover/amortizationSummary/summaryDtl',
            params
        })
    },
    /**摊销汇总--保存明细 */
    turnoverAmortizationSummaryUpdateDtl (params) {
        return httpPost({
            url: '/turnover/amortizationSummary/updateDtl',
            params
        })
    },
    /**摊销汇总--查询明细 */
    turnoverAmortizationSummaryGetDtlList (billId, parentId) {
        return httpPost({
            url: '/turnover/amortizationSummary/getDtlList',
            params: {
                billId,
                parentId: parentId
            }
        })
    },
    /**摊销汇总--查询明细(全量加载) */
    turnoverAmortizationSummaryGetAllDtlList (billId) {
        return httpGet({
            url: '/turnover/amortizationSummary/getAllDtlList',
            params: {
                billId,
            }
        })
    },

    /**********************************盘盈盘亏********************************* */
    /**盘盈盘亏--修改基本信息 */
    turnoverInventoryGainAndInventoryLossUpdate (params) {
        return httpPost({
            url: '/turnover/inventoryGainAndInventoryLoss/update',
            params
        })
    },
    /**盘盈盘亏--更新计划明细 */
    turnoverInventoryGainAndInventoryLossUpdateDtlList (params) {
        return httpPost({
            url: '/turnover/inventoryGainAndInventoryLoss/updateDtlList',
            params
        })
    },
    /**盘盈盘亏--获取明细 */
    turnoverInventoryGainAndInventoryLossFindByBillId (billId) {
        return httpGet({
            url: '/turnover/inventoryGainAndInventoryLoss/findByBillId',
            params: {
                billId,
            }
        })
    },
    /**********************************周材初始化********************************* */
    /**周材初始化--修改基本信息 */
    turnoverInitUpdate (params) {
        return httpPost({
            url: '/turnover/init/update',
            params
        })
    },

    /**周材初始化--保存明细 */
    turnoverInitUpdateDtlList (params) {
        return httpPost({
            url: '/turnover/init/updateDtlList',
            params
        })
    },
    /**周材初始化--查询明细 */
    turnoverInitFindByBillId (billId, parentId) {
        return httpGet({
            url: '/turnover/init/findByBillId',
            params: {
                billId,
                parentId: parentId
            }
        })
    },
}

export default request
